import request from '@/utils/request'

// 获取会话列表
export function listChatSession(params) {
  return request({
    url: '/chat/session/list',  // 确保路径正确
    method: 'get',
    params: params
  })
}
// 获取会话列表(分页)
export function pageChatSession(params) {
  return request({
    url: '/chat/session/page',
    method: 'get',
    params: params
  })
}
// 会话详情
export function getChatSession(id) {
  return request({
    url: `/chat/session/${id}`,
    method: 'get',
  })
}
// 创建会话
export function createChatSession(data) {
  return request({
    url: '/chat/session',
    method: 'post',
    data
  })
}
// 更新会话
export function updateChatSession(data) {
  return request({
    url: '/chat/session',
    method: 'put',
    data
  })
}
// 删除会话
export function deleteChatSession(data) {
  return request({
    url: '/chat/session',
    method: 'delete',
    data
  })
}
